package ace.cmp.security.oauth2.resource.server.core.service;

import ace.cmp.security.core.impl.service.SpringSecurityService;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthentication;

/**
 * @author caspar
 * @date 2023/9/1 17:18
 */
public interface Oauth2SecurityService extends SpringSecurityService<BearerTokenAuthentication> {
  /**
   * get current login success {@link Authentication}
   *
   * @return {@link BearerTokenAuthentication} or {@link org.springframework.security.authentication.AnonymousAuthenticationToken}
   */
  Authentication getAuthentication();
}
